package logic

import (
	"frame/logic/LogicModule"
	"database/sql"
	"frame/logger/HLogger"
	"dao/mapper"
	"fmt"
)

var LoginLogicModule = LogicModule.LogicModule{
	Name:"LoginLogic",
	Transaction:true,
	Gdbcname :"default",
	Logicfunc:LoginLogic,
}

var loginLogicLogger = HLogger.GetHLogger("LoginLogicLogger")

func LoginLogic(context *map[string]interface{},tx *sql.Tx, txnContext HLogger.TxnContext)(interface{},error){
	loginLogicLogger.InfoWithTxnContext(txnContext,"进入LoginLogic")
	var id = (*context)["id"]
	var paramMap = make(map[string]interface{})
	paramMap["id"]=id
	var queryResult = mapper.TblSysDicMapper.QueryOneMap(tx,paramMap)
	loginLogicLogger.InfoWithTxnContext(txnContext,"查询结果为"+fmt.Sprint(queryResult))
	loginLogicLogger.InfoWithTxnContext(txnContext,"离开LoginLogic")
	return queryResult,nil
}
